package _线性;

import org.junit.jupiter.api.Test;

import static _线性._排序.*;
import static org.junit.jupiter.api.Assertions.*;
import static _线性._xx.*;

class _排序Test {

    @Test
    void bubbleSortT() {
        int[] arr = new int[]{0, 2, 10, 8, 4, 2, 6, 8};
        print(arr);
//        bubbleSort(arr);
        print(arr);
    }

    @Test
    void insertionSort() {
        int[] arr = new int[]{0, 2, 10, 8, 4, 2, 6, 8};
        print(arr);
        insertSort1(arr);
        print(arr);
    }

    @Test
    void quickSortT() {
        int[] arr = new int[]{0, 2, 10, 8, 4, 2, 6, 8};
        print(arr);
        quickSort(arr, 0, arr.length - 1);
        print(arr);
    }
    @Test
    void selectSortT() {
        int[] arr = new int[]{0, 2, 10, 8, 4, 2, 6, 8};
        print(arr);
        selectionSort1(arr);
        print(arr);
    }

    @Test
    void mergeSort() {
    }

    @Test
    void countingSort() {
    }

    @Test
    void intersect() {
    }


    @Test
    void heapSortT() {
        int[] arr = new int[]{0, 2, 10, 8, 4, 2, 6, 8};
        print(arr);
        heapSort1(arr);
        print(arr);
    }
    private void print(int[] arr) {
        for (int i : arr) {
            System.out.print(i + " ");
        }
        System.out.println();
    }
}